<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<base href="<%=basePath%>">
	<title>hr-m-s</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="css/style.css" >
</head>
<body>
<form id="department_add" name="department_add" method="post" action="department!add">
  <table width="800" border="1" cellpadding="0" cellspacing="0" align="center">
    <tr>
      <th colspan="3" scope="col">添加新部门</th>
    </tr>
    <tr>
      <td width="150">部门名称</td>
      <td width="450">
        <input name="departmentName" type="text" id="departmentName" size="50" maxlength="50" />
      </td>
      <td width="200">请输入部门名称</td>
    </tr>
    <tr>
      <td>是否启用</td>
      <td>
        <select name="departmentDisplayKey" id="departmentDisplayKey">
          <option value="1">启用</option>
          <option value="0">停用</option>
        </select></td>
      <td>用于控制部门的显示</td>
    </tr>
    <tr>
      <td colspan="3">
        <input type="submit" name="Submit" value="提交" onclick="return checkForm();" />
		<input type="reset" name="Reset" value="重置" onclick="javascript:return confirm('确定要重新填写部门信息吗？');" />
	  </td>
    </tr>
  </table>
</form>
<script type="text/javascript">
	function checkForm(){
		var name = document.getElementById("departmentName");
		if (name.value == ""){
			alert("请输入部门名称！");
			name.focus();
			return false;
		}
		return true;
	}
</script>
</body>
</html>
